package com.wan.adapter

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
import com.wan.entity.SystemTabEntity
import com.wan.fragment.SystemSonBaseFragment

class SystemTabVpAdapter(fm: FragmentManager?, var titleList: ArrayList<SystemTabEntity>, var fragmentList: ArrayList<SystemSonBaseFragment>) : FragmentPagerAdapter(fm) {

    override fun getItem(position: Int): Fragment {
        return fragmentList[position]
    }

    override fun getCount(): Int {
        return fragmentList.size
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return titleList[position].name
    }

}